#ifndef _STATEEVENT_H_
#define _STATEEVENT_H_

#include <functional>
#include <SECore/StateMachine/State.h>
#include <SECore/Signal.h>
#include <SECore/Descriptor.h>

namespace SEngine
{
    class StateMachine;
    class StateEvent : public AnyDescriptor
    {
        friend class StateMachine;
    public:
        std::function<bool(State &, State &)> Condition = [](State &, State &) { return true; };
        bool Transform() {
            bool ret = false;
            SignalTransform.Invoke(ret);
            return ret;
        }
    private:
        Signal<bool&> SignalTransform;
    }; 
    
} // namespace SEngine


#endif